---
page_title: "cloudflare_workers_kv Resource - Cloudflare"
subcategory: ""
description: |-
  Provides a resource to manage a Cloudflare Workers KV Pair.
---

# cloudflare_workers_kv (Resource)

Provides a resource to manage a Cloudflare Workers KV Pair.

## Example Usage

```terraform
resource "cloudflare_workers_kv_namespace" "example_ns" {
  account_id = "f037e56e89293a057740de681ac9abbe"
  title      = "test-namespace"
}

resource "cloudflare_workers_kv" "example" {
  account_id   = "f037e56e89293a057740de681ac9abbe"
  namespace_id = cloudflare_workers_kv_namespace.example_ns.id
  key          = "test-key"
  value        = "test value"
}
```
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `account_id` (String) The account identifier to target for the resource.
- `key` (String) Name of the KV pair. **Modifying this attribute will force creation of a new resource.**
- `namespace_id` (String) The ID of the Workers KV namespace in which you want to create the KV pair. **Modifying this attribute will force creation of a new resource.**
- `value` (String) Value of the KV pair.

### Read-Only

- `id` (String) The ID of this resource.

## Import

Import is supported using the following syntax:

```shell
$ terraform import cloudflare_workers_kv.example <account_id>/<namespace_id>/<key_name>
```
